/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.scene.mapper;

import com.koron.scene.domain.ActivityStage;
import org.apache.ibatis.annotations.Param;
import org.koron.ebs.mybatis.EnvSource;

import java.util.List;

@EnvSource("_default")
public interface ActivityStageMapper {

    /**
     * insert stage
     * @param stage
     * @return
     */
    Integer insert(@Param("stage") ActivityStage stage);


    /**
     * insert stage in batch
     * @param stageList
     * @return
     */
    Integer batchInsert(@Param("stageList") List<ActivityStage> stageList);


    /**
     * delete stage in batch
     * @param idList
     * @return
     */
    Integer batchDetele(@Param("idList") List<String> idList);


    /**
     * update one stage
     * @param stage
     * @return
     */
    Integer update(@Param("stage") ActivityStage stage);


    Integer batchUpdate(@Param("stageList") List<ActivityStage> stageList);


    /**
     * query the one whose id is the given
     * @param id
     * @return
     */
    ActivityStage queryOne(@Param("id") String id);


    List<ActivityStage> queryStages(@Param("siteActivityId") String siteActivityId);


    List<ActivityStage> queryForName(@Param("siteActivityId") String siteActivityId, @Param("name") String name);



}
